{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "using Expr2LaTeX"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$x^{\\frac{1}{(y + 2)}}$"
      ],
      "text/plain": [
       "L\"$x^{\\frac{1}{(y + 2)}}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "@render x^(1/(y+2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$(2^{x} + 2)$"
      ],
      "text/plain": [
       "L\"$(2^{x} + 2)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$2^{(x + 2)}$"
      ],
      "text/plain": [
       "L\"$2^{(x + 2)}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$2^{\\frac{x}{(x + 2)}}$"
      ],
      "text/plain": [
       "L\"$2^{\\frac{x}{(x + 2)}}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\mathrm{log}(x)$"
      ],
      "text/plain": [
       "L\"$\\mathrm{log}(x)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$2$"
      ],
      "text/plain": [
       "L\"$2$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$20^{30}$"
      ],
      "text/plain": [
       "L\"$20^{30}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$(1 + 1)$"
      ],
      "text/plain": [
       "L\"$(1 + 1)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$2^{(1 + 1)}$"
      ],
      "text/plain": [
       "L\"$2^{(1 + 1)}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$(1 + (2 + 3))$"
      ],
      "text/plain": [
       "L\"$(1 + (2 + 3))$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\frac{1}{2}$"
      ],
      "text/plain": [
       "L\"$\\frac{1}{2}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\frac{1}{(2 + 3)}$"
      ],
      "text/plain": [
       "L\"$\\frac{1}{(2 + 3)}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$f(x)$"
      ],
      "text/plain": [
       "L\"$f(x)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$f(x ,  y)$"
      ],
      "text/plain": [
       "L\"$f(x ,  y)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\mathrm{sin}(x)$"
      ],
      "text/plain": [
       "L\"$\\mathrm{sin}(x)$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\left[\\begin{array}{ccc}\n",
       "1\\\\2\\\\3\n",
       "\\end{array}\\right]$"
      ],
      "text/plain": [
       "L\"$\\left[\\begin{array}{ccc}\n",
       "1\\\\2\\\\3\n",
       "\\end{array}\\right]$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\mathrm{log}(\\left[\\begin{array}{ccc}\n",
       "1\\\\2\\\\\\frac{(2 + e^{x})}{3}\n",
       "\\end{array}\\right])$"
      ],
      "text/plain": [
       "L\"$\\mathrm{log}(\\left[\\begin{array}{ccc}\n",
       "1\\\\2\\\\\\frac{(2 + e^{x})}{3}\n",
       "\\end{array}\\right])$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\frac{\\left[\\begin{array}{ccc}\n",
       "1 & 2 & 3\\\\4 & 3 & 2\\\\π & pi & gamma\n",
       "\\end{array}\\right]}{2}$"
      ],
      "text/plain": [
       "L\"$\\frac{\\left[\\begin{array}{ccc}\n",
       "1 & 2 & 3\\\\4 & 3 & 2\\\\π & pi & gamma\n",
       "\\end{array}\\right]}{2}$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "@render 2^x+2\n",
    "@render 2^(x+2)\n",
    "@render 2^(x/(x+2))\n",
    "@render log(x)\n",
    "@render 2\n",
    "@render 20^30\n",
    "@render 1+1\n",
    "@render 2^(1+1)\n",
    "@render 1+(2+3)\n",
    "@render 1/2\n",
    "@render 1/(2+3)\n",
    "@render f(x)\n",
    "@render f(x,y)\n",
    "@render sin(x)\n",
    "@render [1,2,3]\n",
    "@render log([1; 2; (2+e^x)/3])\n",
    "@render [1 2 3; 4 3 2; π pi gamma]/2\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\left[\\begin{array}{cccc}\n",
       "0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\n",
       "\\end{array}\\right]$"
      ],
      "text/plain": [
       "L\"$\\left[\\begin{array}{cccc}\n",
       "0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 0.0\n",
       "\\end{array}\\right]$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\left[\\begin{array}{cccc}\n",
       "1.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 2.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 3.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 4.0\n",
       "\\end{array}\\right]$"
      ],
      "text/plain": [
       "L\"$\\left[\\begin{array}{cccc}\n",
       "1.0 & 0.0 & 0.0 & 0.0\\\\0.0 & 2.0 & 0.0 & 0.0\\\\0.0 & 0.0 & 3.0 & 0.0\\\\0.0 & 0.0 & 0.0 & 4.0\n",
       "\\end{array}\\right]$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/latex": [
       "$\\left[\\begin{array}{cccc}\n",
       "1.0 & Inf & Inf & Inf\\\\Inf & 0.125 & Inf & Inf\\\\Inf & Inf & 0.037037 & Inf\\\\Inf & Inf & Inf & 0.015625\n",
       "\\end{array}\\right]$"
      ],
      "text/plain": [
       "L\"$\\left[\\begin{array}{cccc}\n",
       "1.0 & Inf & Inf & Inf\\\\Inf & 0.125 & Inf & Inf\\\\Inf & Inf & 0.037037 & Inf\\\\Inf & Inf & Inf & 0.015625\n",
       "\\end{array}\\right]$\""
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = zeros(4,4)\n",
    "renderval(x)\n",
    "y=x[diagind(4,4)] = 1:4\n",
    "renderval(x)\n",
    "renderval(1./ x.^3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.5.0-rc0",
   "language": "julia",
   "name": "julia-0.5"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.5.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
